package com.zjtx.springcloud.alibaba.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wuxiaobing
 * @title TestController
 * @description TODO
 * @date 2020/7/20 0020 下午 23:05
 */
@RestController
public class TestController {

    @RestController
    @RefreshScope
    public class ConfigController {

        @Value("${username:lily}")
        private String username;

        @RequestMapping("/username")
        public String get() {
            return username;
        }

    }

}
